package com.ym.medical.dao;

import com.ym.medical.domain.entity.DoctorLabelEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 医生标签Dao接口
 *
 * @author ym
 * @date 2020-08-24
 */
@Repository
public interface DoctorLabelDao extends Mapper<DoctorLabelEntity> {

	/***
	 * 删除医生标签同时删除标签中间表
	 * @param labId
	 * @return
	 */
	int deleteByLabId(Long labId);

	/**
	 * 医生标签ids
	 * @param doctId
	 * @param str
	 * @return
	 */
	Long[] selectLabIds(@Param("doctId") Long doctId,
						@Param("str") String str);

	/**
	 * 批量新增
	 * @param doctorLabels
	 */
	void insertLabels(List<DoctorLabelEntity> doctorLabels);
}
